package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.eunm.ActivityTypeNameCode;
import com.ytjj.qmyx.admin.model.request.ProductInfoRequest;
import com.ytjj.qmyx.admin.service.ProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 *
 * @Version: 1.0
 */
@RestController
@RequestMapping("/productInfo")
public class ProductInfoController {

    @Autowired
    private ProductInfoService productInfoService;

    @PostMapping("/productInfoStatistics")
    public CommonResult productInfoStatistics(@RequestBody ProductInfoRequest productInfoRequest) {
        return CommonResult.success(productInfoService.productInfoStatistics(productInfoRequest));
    }

    @PostMapping("/getActivityTypeList")
    public CommonResult getActivityTypeList(){
        return CommonResult.success(ActivityTypeNameCode.getTypeList());
    }

}
